<template>
  <div>
    <el-header>Vue3+ECharts</el-header>
    <el-container>
      <el-aside width="200px">
        <navMenu />
      </el-aside>
      <el-main>
        <router-view />
      </el-main>

    </el-container>


  </div>
</template>
<script setup>
import navMenu from './view/navMenu.vue'
// import { onMounted, ref } from 'vue';


function aaa(...args) {
  let count = 0
  // let count = args.reduce((pre, cur) => {
  //   return pre + cur
  // }, 0);//使用数组的reduce函数，第二个参数设置默认值
  const nextFun = (...args1) => {
    count = args1.reduce((pre, cur) => {
      return pre + cur
    }, count);
    return nextFun;//再次返回该方法用递归来实现无限累加
  }
  nextFun.valueOf = function () {
    return count
  }
  nextFun(...args)
  return nextFun;
}
const b = aaa(12)(13, 1, 5)(6)(7, 8).valueOf()
console.log(b);

</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}

html,
body,
#app {
  height: 100%;
  width: 100%;
}
</style>
